<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
	<head>
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />				
		<meta charset="UTF-8">
		<title>双周复诊</title>
		<link rel="stylesheet" href="${BASE_PATH}/static/app/css/reset.css" />
		<link rel="stylesheet" type="text/css" href="${BASE_PATH}/static/app/css/header.css"/>	
        <link rel="stylesheet" href="${BASE_PATH}/static/app/css/biweeklyReferral.css" />
	</head>
	<body>
		<div class="header">
		<span class="back" onclick="history.go(-1);"></span>
			<a href="/index"><span class="logo_pic"></span></a>
			<span class="logo_text">OK 妈咪</span>
		</div>
		<div class="header-top" >
				<h3 class="hearder-title">双周复诊表
					<%-- <span>${refe.date }</span> --%>
					<select class="title-time" id="selectchange">
						<c:forEach var="list" items="${list }">
							<option value="${list.id }" <c:if test="${list.id == refe.id }">selected</c:if>  >${list.date }</option>
						</c:forEach>
					</select>
				</h3>	
		</div>
		<div id="biweekly">
		
			<div class="warp">
				<h3>身体检测结果</h3>
				<p>${refe.result }</p>
			</div>
			<div class="warp">
				<h3>居家配合方案</h3>
				<p>${refe.program }</p>
			</div>
			<div class="warp">
				<h3>方案调整</h3>
				<p>${refe.program_regulate }</p>
			</div>
			<p class="foooter-name">院长<span>${refe.dean }</span></p> 
			<p class="foooter-name">顾问<span>${refe.trueName }</span></p>
		</div>
	</body>
	<script type="text/javascript" src="${BASE_PATH}/static/lib/jquery/jquery-1.11.2.min.js"></script>
	<script type="text/javascript" src="${BASE_PATH}/static/lib/template/template.js"></script>
	<script type="text/javascript" src="${BASE_PATH}/static/app/js/kit.js"></script>
	<script type="text/javascript">
		
		$(function(){
			biweeklyReferral();
		});
		function biweeklyReferral(){
			var id=$("#selectchange").val();
			Kit.ajax.post("${BASE_PATH}/my/myInfo/biweekly",{id:id},function(result){
				$("#biweekly").empty();
				$("#biweekly").append(template("dataTpls",result.object));
			})
		}
		$("#selectchange").change(function(){
			biweeklyReferral();
		})
	</script>
	<script type="text/html" id="dataTpls">
			<div class="warp">
				<h3>身体检测结果</h3>
				<p>{{result }}</p>
			</div>
			<div class="warp">
				<h3>居家配合方案</h3>
				<p>{{program }}</p>
			</div>
			<div class="warp">
				<h3>方案调整</h3>
				<p>{{program_regulate }}</p>
			</div>
            <p class="foooter-name">院长<span>{{dean }}</span></p> 
			<p class="foooter-name">顾问<span>{{trueName }}</span></p>
	</script>
</html>
